const API_SUFFIX_URI = "api/v1";

const NOT_AUTH = API_SUFFIX_URI + "/account/";
const SETTING = API_SUFFIX_URI + "/userSetting/";
const PAYMENT = API_SUFFIX_URI + "/paymentAttach/";
const CONFIG = API_SUFFIX_URI + "/config/";
const BILLING = API_SUFFIX_URI + "/billing/";
const MESSAGE = API_SUFFIX_URI + "/userMessage/";
const COMMON = API_SUFFIX_URI + "/common/";
const HOME = API_SUFFIX_URI + "/home/";

const PAYMENT_CALL = API_SUFFIX_URI + "/pay/"

export const IMG_URI_ADDRESS = "https://cdn.iextend.top/";

/**
 * 支付api 测试
 */
export const API_PAY_ADDRESS = {
    TRANSACTION: PAYMENT_CALL + "getTransactionDetail",  // api 测试获取支付信息
    REFUND_MORE: PAYMENT_CALL + "refund"                 // 调用退款

}

export const API_ADDRESS = {
    EXTERNAL_URL: "http://ip-api.com/json/",


    /**
     * 无需token 验证的
     */
    LOGIN: NOT_AUTH + "login",                            // 用户正常方式登录
    SEND_VERIFY_CODE: NOT_AUTH + "sendVerifyCode",        // 发送验证码
    USE_2FA_LOGIN: NOT_AUTH + "use2FALogin",              // 2FA 登录方式
    USE_VERIFY_LOGIN: NOT_AUTH + "useVerifyLogin",        // 使用验证码方式登录
    REGISTER_ACCOUNT: NOT_AUTH + "registerAccount",       // 注册账号
    AUTH_LOGIN: NOT_AUTH + "authLogin",                   // 三方登录
    AUTH_REGISTER: NOT_AUTH + "authLoginRegister",        // 三方登录注册
    AUTH_BIND_ACCOUNT: NOT_AUTH + "authLoginBindAccount", // 三方登录绑定
    FORGET_PWD: NOT_AUTH + "forgetPwd",                    // 忘记密码


    /**
     * 首页数据
     */
    HOME_DETAIL: HOME + "getHomeGMV",                      // 获取各交易额GMV

    /**
     * 用户设置
     */
    CREATE_API_KEY: SETTING + "createNewsApiKey",               // 生成新的密钥
    VERIFY_2FA_CORRECT: SETTING + "verify2FACorrect",           // 2fa 验证
    UPDATE_2FA_METHOD: SETTING + "update2FAVerifyMethod",       // 更换2FA 或 重新设置 密钥
    UPDATE_USER_BASIC: SETTING + "updateUserBasic",             // 用户基础信息更改
    UPDATE_LOGIN_PWD: SETTING + "updateUserLoginPwd",           // 修改登录密码
    UNBIND_LOGIN_METHOD: SETTING + "unbindAuthLoginMethod",     // 解除三方登录方式
    BIND_AUTH_LOGIN_METHOD: SETTING + "bindAuthLoginMethod",    // 绑定第三方登录方式
    BIND_ACCOUNT_LOGIN_METHOD: SETTING + "bindAccountBasicLoginMethod", // 绑定 或 换绑 [手机 或 email]
    USER_LOGOUT: SETTING + "userLogout",                        // 退出登录
    USER_BASIC_DETAIL: SETTING + "getUserBasicDetail",          // 用户基础信息

    /**
     * 用户其他信息
     */
    USER__DEVICE_LIST: MESSAGE + "getAppointUserDeviceList",        // 获取用户的设备信息列表
    USER_API_KEY_LIST: MESSAGE + "getAppointUserApiKeyList",        // 调用api 的列表
    USER_WALLET_LIST: MESSAGE + "getAppointUserWalletList",         // 用户各钱包信息
    USER_MESSAGE_LIST: MESSAGE + "getAppointUserWalletList",        // 获取用户消息列表


    /**
     * 支付数据查看 与操作
     */
    GET_CALL_PAYMENT: PAYMENT + "getCallPaymentList",             // 获取调用支付的数据列表
    GET_APPOINT_PAYMENT: PAYMENT + "getAppointPaymentAttachData", // 根据id 获取本次支付调用的详细数据
    GET_PAYMENT_CALL_LIST: PAYMENT + "getPaymentCallList",        // 消息队列执行列表
    EXECUTE_PAYMENT_BACK: PAYMENT + "executePaymentCallBack",     // 回调重新执行

    /**
     * 项目设置
     */
    PROJECT_SETTING_LIST: CONFIG + "projectSettingList",                // 项目设置配置
    PROJECT_OFFICIAL: CONFIG + "projectOfficial",                       // 项目文案内容
    UPDATE_OFFICIAL_CONTENT: CONFIG + "updateProjectOfficialContent",   // 修改项目文案内容

    /**
     * 账单与流水
     */
    BILLING_LIST: BILLING + "billing",                                  // 流水信息

    VERIFY_PAY_SUCCESS: COMMON + "verifyPaySuccess"                     // 验证此次支付是否成功
};

/**
 * 支付渠道
 */
export const PAY_METHOD = [
    {value: 0, text: "选择支付渠道"},
    {value: 1, text: "支付宝"},
    {value: 2, text: "Stripe"},
    {value: 3, text: "微信"},
    {value: 4, text: "银联"},
    {value: 5, text: "PayPal"}
]

/**
 * 支付平台
 */
export const PAY_CLIENT = [
    {value: 'not', text: "选择支付平台"},
    {value: "Applet", text: "小程序"},
    {value: "Web", text: "网页"},
    {value: "App", text: "App软件"},
    {value: "qrcode", text: "二维码"}
]

/**
 * 时间选择
 */
export const TIME_SELECT = [
    {value: 0, text: "所有时间"},
    {value: 1, text: "1小时内"},
    {value: 2, text: "3天内"},
    {value: 3, text: "7天内"},
    {value: 4, text: "1个月内"}
]
/**
 * 支付状态
 */
export const PAYMENT_STATUS = [
    {value: -1, text: "支付状态"},
    {value: 0, text: "未支付"},
    {value: 1, text: "已支付"},
    {value: 2, text: "支付已处理"},
    {value: 3, text: "退款中"},
    {value: 4, text: "已退款"},
    {value: 5, text: "退款已处理"}
]

/**
 * 流水状态
 */
export const BILLING_STATUS = [
    {value: -1, text: "流水操作"},
    {value: 0, text: "支付"},
    {value: 1, text: "退款"},
    {value: 2, text: "提现"}
]
